package matchthreegame.utils;

import java.util.ArrayList;
import java.util.HashMap;

public class HeroSkills {
	
	public static ArrayList<HashMap<Integer, Integer>> getHeroSkillsForType(int heroType) {
		
		ArrayList<HashMap<Integer, Integer>> heroSkills = null;
		
		switch (heroType) {
		case 1:
			heroSkills = heroSkills1;
			break;
			
		case 2:
			heroSkills = heroSkills2;
			break;
			
		case 3:
			heroSkills = heroSkills3;
			break;
			
		case 4:
			heroSkills = heroSkills4;
			break;
			
		case 5:
			heroSkills = heroSkills5;
			break;
			
		case 6:
			heroSkills = heroSkills6;
			break;
			
		case 7:
			heroSkills = heroSkills7;
			break;
			
		case 8:
			heroSkills = heroSkills8;
			break;
			
		case 9:
			heroSkills = heroSkills9;
			break;
			
		default:
			break;
		}
		
		return heroSkills;
		
	}
	
	//Hero skills
	//First array is effect on myself, second array is effect on other player
	
	//Type 1
	private static ArrayList<HashMap<Integer, Integer>> heroSkills1 = new ArrayList<HashMap<Integer,Integer>>(){{
		
		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 2);
			put(2, 2);
			put(3, 2);
			put(4, 2);
			put(5, 0);
			put(6, 0);
		}});
		
		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, 0);
			put(2, 0);
			put(3, 0);
			put(4, 0);
			put(5, 0);
			put(6, 0);
		}});
		
	}};
	
	//Type 2
	private static ArrayList<HashMap<Integer, Integer>> heroSkills2 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 0);
			put(2, 0);
			put(3, 0);
			put(4, 0);
			put(5, 0);
			put(6, 0);
		}});
		
		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -2);
			put(2, -2);
			put(3, -2);
			put(4, -2);
			put(5, 0);
			put(6, 0);
		}});
		
	}};

	//Type 3
	private static ArrayList<HashMap<Integer, Integer>> heroSkills3 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 2);
			put(2, 2);
			put(3, 2);
			put(4, 2);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -2);
			put(2, -2);
			put(3, -2);
			put(4, -2);
			put(5, 0);
			put(6, 0);
		}});

	}};
	
	//Type 4
	private static ArrayList<HashMap<Integer, Integer>> heroSkills4 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 2);
			put(2, 2);
			put(3, 2);
			put(4, 2);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -2);
			put(2, -2);
			put(3, -2);
			put(4, -2);
			put(5, 0);
			put(6, 0);
		}});

	}};

	//Type 5
	private static ArrayList<HashMap<Integer, Integer>> heroSkills5 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 5);
			put(2, 5);
			put(3, 5);
			put(4, 5);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, 0);
			put(2, 0);
			put(3, 0);
			put(4, 0);
			put(5, 0);
			put(6, 0);
		}});

	}};

	//Type 6
	private static ArrayList<HashMap<Integer, Integer>> heroSkills6 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 5);
			put(2, 5);
			put(3, 5);
			put(4, 5);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -2);
			put(2, -2);
			put(3, -2);
			put(4, -2);
			put(5, 0);
			put(6, 0);
		}});

	}};

	//Type 7
	private static ArrayList<HashMap<Integer, Integer>> heroSkills7 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 5);
			put(2, 5);
			put(3, 5);
			put(4, 5);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -2);
			put(2, -2);
			put(3, -2);
			put(4, -2);
			put(5, 0);
			put(6, 0);
		}});

	}};

	//Type 8
	private static ArrayList<HashMap<Integer, Integer>> heroSkills8 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 5);
			put(2, 5);
			put(3, 5);
			put(4, 5);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -5);
			put(2, -5);
			put(3, -5);
			put(4, -5);
			put(5, 0);
			put(6, 0);
		}});

	}};

	//Type 9
	private static ArrayList<HashMap<Integer, Integer>> heroSkills9 = new ArrayList<HashMap<Integer,Integer>>(){{

		//produces
		add(new HashMap<Integer, Integer>(){{
			put(1, 5);
			put(2, 5);
			put(3, 5);
			put(4, 5);
			put(5, 0);
			put(6, 0);
		}});

		//attack
		add(new HashMap<Integer, Integer>(){{
			put(1, -5);
			put(2, -5);
			put(3, -5);
			put(4, -5);
			put(5, 0);
			put(6, 0);
		}});

	}};

}
